

// Definition for singly-linked list.
class ListNode {
    val: number
    next: ListNode | null
    constructor(val?: number, next?: ListNode | null) {
        this.val = (val===undefined ? 0 : val)
        this.next = (next===undefined ? null : next)
    }
}


/**
 Do not return anything, modify it in-place instead.
 */


 /**
 * 题解
 * 
 * 将当前的数据用下一个节点替换即可
 */
 function deleteNode(node: ListNode | null): void {
    node!.val = node!.next!.val;
    node!.next = node!.next!.next;
};